from api.basic_api import BaseManagerApi
from common.encry_decry import md5
from common.file_load import load_yaml_file


class ManagerLoginApi(BaseManagerApi):
    def __init__(self,username,password):
        super().__init__()#继承父类属性
        # self.session=requests.session()
        self.url =f'{self.host}/admin/systems/admin-users/login'
        # self.headers = {"Authorization": ""}
        # 表单参数
        self.method ='get'
        self.params = {
            "username": username,
            "password": md5(password),
            "captcha": load_yaml_file('/config/common.yml')['captcha'],
            "uuid": "sdahhdsjhashdhjsdh"
        }
if __name__ == '__main__':
    BaseManagerApi()
    resp=ManagerLoginApi().send()
    print(resp.text)